export let initState = {
    goodsInfo:{}
}

export const reducer = (state,action) =>{
    switch(action.type){
        case "changeGoodsInfo":
            return{
                ...state,
                goodsInfo:action.obj
            }
        default:
            return state
    }
}

export let actions = {
    changeGoodsInfo:(obj)=>({type:"changeGoodsInfo",obj})
}

export let getGoodsInfo = state => state.goodsInfo